import request from '@/utils/request'


export function teacherListPage(page,limit,teacherQuery) {
    return request({
      url: '/service_edu/edu_teacher/pageTeacherCondition/'+page+'/'+limit,
      method: 'post',
      data: teacherQuery,
      params:{teacherQuery}
    })
}

export function deleteTeacherById(id){
    return request({
      url: '/service_edu/edu_teacher/removeTeacher/'+id,
      method: 'delete'
    })
}

export function addTeacher(teacher){
  return request({
    url: '/service_edu/edu_teacher/addTeacher',
    method: 'post',
    data: teacher,
    params : {teacher}
  })
}

export function getTeacherInfo(id){
  return request({
    url: '/service_edu/edu_teacher/getById/'+id,
    method: 'get',
  })
}

export function updateTeacher(id,teacher){
  return request({
    url: '/service_edu/edu_teacher/updateById/'+id,
    method: 'put',
    data:teacher,
    params:{teacher}
  })
}